<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/6
 * Time: 10:11
 */
if (empty($_POST['username'])){
    echo '用户名为必填项';
    die;
}
if (empty($_POST['pwd'])){
    echo '密码不能为空';
    die;
}
if($_POST['username']=='admin'&& $_POST['pwd']=='888888'){
    echo '登录成功';
    setcookie('Token',md5($_POST['username'].$_POST['pwd'].time()),time()+24*3600);
    echo'<a href="user.php" >用户中心</a>';
}else{
    echo '登录失败';
}